/*
 * ctype.c
 * Implementacion de las funciones
 * de ctype.h
 */

#include "../include/ctype.h"


int
isdigit( int c )
{
    return ( (c) > '0' && (c) < '9' );
}

int
islower( int c )
{
    return (  (c) >='a' && (c) <= 'z'  );
}

int
isupper( int c )
{
    return ( (c) >='A' && (c) <= 'Z' );
}

int
isalpha( int c )
{
    return ( islower( c ) || isupper( c ) );
}

int
isalnum( int c )
{
    return( isalpha( c ) || isdigit( c ) );
}
int
toupper( int c )
{
    return ( islower( c ) ? ((c) - 'a' + 'A'): (c) );
}

int
tolower( int c )
{
    return ( isupper( c ) ? (c) - 'A' + 'a' : (c) );
}

int
isvocal( int c )
{
    return( c == 'a' || c == 'A' || c == 'e' || c == 'E' ||
            c == 'i' || c == 'I' || c == 'o' || c == 'O' ||
            c == 'u' || c == 'U' );
}
